<template>
	<view class="content">
		<view class="ui_head">
			<image class="ui_head_bg" src="/static/img/bg_chuchuang.png" mode=""></image>
			<view class="ui_head_time">
				距任务结束剩余
				<p>23</p>:
				<p>18</p>:
				<p>30</p>
			</view>
			<view class="ui_head_task_bg"></view>
			<view class="ui_head_task">
				<view class="ui_head_task_title">任务一</view>
				<view class="ui_head_task_text">点击进入10个橱窗下单，并上传凭证</view>

				<view class="ui_head_task_right">
					<view class="ui_head_task_right_lable s"></view>
					<view class="ui_head_task_right_lable"></view>
					<view class="ui_head_task_right_text">
						<p>1</p>/2
					</view>
				</view>
			</view>
		</view>

		<view class="ui_list" v-if="task_type==0">
			<view class="ui_list_item">
				<image class="ui_list_item_img" src="/static/img/icon_tast_list.png" mode=""></image>
				<view class="ui_list_item_text">漫漫的橱窗</view>
				<view class="ui_list_item_btn">已完成</view>
			</view>
			<view class="ui_list_item" v-for="(item,index) in 4" :key="index">
				<image class="ui_list_item_img" src="/static/img/icon_tast_list.png" mode=""></image>
				<view class="ui_list_item_text">漫漫的橱窗</view>
				<view class="ui_list_item_btn s">进入橱窗</view>
			</view>
		</view>
		
		<view class="ui_list" v-if="task_type==1">
			<view class="ui_list_item2" v-for="(item,index) in 3" :key="index">
				<image class="ui_list_item2_img" src="/static/img/icon_tast_list.png" mode=""></image>
				<view class="ui_list_item2_text">漫漫的橱窗</view>
				<view class="ui_list_item2_time">2025-05-20 14:56:32成功加入</view>
			</view>
		</view>
		
		
		<view class="ui_btn" @click="goTo()">
			<image class="ui_btn_icon" src="/static/img/icon_invite.png" mode=""></image>
			<view class="ui_btn_text">邀请好友成为店主</view>
		</view>

		<view style="height: 200rpx;"></view>
		<tabbar :current-page="3"></tabbar>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				task_type: 1,//0任务一   1任务二
			}
		},
		methods: {
			goTo(){
				this.$util.navTo('/pages/index/code2')
			}
		}
	}
</script>

<style lang="less">
	.content {
		width: 750rpx;
		position: relative;
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		
		.ui_btn {
			margin-top: 20rpx;
			width: 714rpx;
			height: 90rpx;
			background: linear-gradient(90deg, #C7974E, #986B28);
			border-radius: 45rpx;
			display: flex;
			align-items: center;
			justify-content: center;
			&_icon {
				width: 40rpx;
				height: 40rpx;
				margin-right: 10rpx;
			}
			&_text {
				font-size: 32rpx;
				color: #FFFFFF;
				font-weight: bold;
			}
		}

		.ui_list {
			width: 714rpx;
			display: flex;
			flex-direction: column;
			
			&_item2 {
				margin-top: 20rpx;
				width: 714rpx;
				height: 160rpx;
				background: #FFFFFF;
				border-radius: 10rpx;
				display: flex;
				position: relative;
				&_img {
					width: 120rpx;
					height: 120rpx;
					border-radius: 60rpx;
					border: 4px solid #FFFFFF;
					margin: 20rpx;
				}
				&_text {
					position: absolute;
					top: 48rpx;
					left: 178rpx;
					font-family: PingFang SC;
					font-weight: bold;
					font-size: 32rpx;
					color: #333333;
				}
				&_time {
					position: absolute;
					top: 100rpx;
					left: 178rpx;
					font-family: PingFang SC;
					font-weight: 500;
					font-size: 24rpx;
					color: #666666;
				}
			}

			&_item {
				width: 714rpx;
				height: 140rpx;
				background: #FFFFFF;
				border-radius: 10rpx;
				border: 1px solid #FFFFFF;
				display: flex;
				align-items: center;
				margin-top: 20rpx;

				&_img {
					margin-left: 20rpx;
					width: 100rpx;
					height: 100rpx;
					background: #939BC1;
					box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(172, 127, 59, 0.3);
					border-radius: 20rpx;
					border: 4px solid #FFFFFF;
				}

				&_text {
					flex: 1;
					margin-left: 20rpx;
					font-family: PingFang SC;
					font-weight: bold;
					font-size: 32rpx;
					color: #333333;
				}

				&_btn {
					width: 160rpx;
					height: 60rpx;
					line-height: 60rpx;
					text-align: center;
					background: #C5BBAD;
					border-radius: 30rpx;
					margin-right: 20rpx;
					font-size: 26rpx;
					color: #FFFFFF;
				}

				.s {
					background: linear-gradient(90deg, #C7974E, #986B28);
				}
			}
		}

		.ui_head {
			width: 750rpx;
			height: 480rpx;
			z-index: 88;
			display: flex;
			position: relative;

			&_bg {
				position: absolute;
				top: 0;
				left: 0;
				width: 750rpx;
				height: 480rpx;
				z-index: 89;
			}

			&_time {
				display: flex;
				margin-top: 258rpx;
				margin-left: 35rpx;
				z-index: 889;
				font-family: PingFang SC;
				font-weight: bold;
				font-size: 24rpx;
				color: #333333;

				p {
					margin: 0 10rpx;
					width: 36rpx;
					line-height: 36rpx;
					height: 36rpx;
					text-align: center;
					background: #AC7F3B;
					border-radius: 10rpx;
					font-family: PingFang SC;
					font-weight: bold;
					font-size: 24rpx;
					color: #FFFFFF;
				}
			}

			&_task_bg {
				position: absolute;
				bottom: 29rpx;
				left: 43rpx;
				width: 664rpx;
				height: 120rpx;
				background: #FFFFFF;
				border-radius: 20rpx;
				opacity: 0.5;
				z-index: 889;
			}

			&_task {
				z-index: 889;
				position: absolute;
				bottom: 15rpx;
				left: 17rpx;
				width: 714rpx;
				height: 120rpx;
				background: #FFFFFF;
				box-shadow: 0rpx 3rpx 24rpx 0rpx rgba(172, 127, 59, 0.07);
				border-radius: 20rpx;
				display: flex;
				flex-direction: column;

				&_title {
					font-size: 30rpx;
					color: #000;
					margin-top: 22rpx;
					margin-left: 29rpx;
				}

				&_text {
					margin-top: 10rpx;
					margin-left: 29rpx;
					font-family: PingFang SC;
					font-weight: 500;
					font-size: 24rpx;
					color: #666666;
				}

				&_right {
					position: absolute;
					right: 20rpx;
					top: 10rpx;
					display: flex;
					align-items: center;

					&_lable {
						width: 30rpx;
						height: 8rpx;
						background: #F1EBE2;
						border-radius: 4rpx;
						margin-right: 5rpx;
					}

					.s {
						width: 30rpx;
						height: 8rpx;
						background: #AC7F3B;
						border-radius: 4rpx;
					}

					&_text {
						margin-left: 20rpx;
						display: flex;
						align-items: center;
						font-family: PingFang SC;
						font-weight: 500;
						font-size: 20rpx;
						color: #AC7F3B;
					}

					p {
						color: #AC7F3B;
					}
				}
			}
		}
	}
</style>